<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/denglu.css">
    <link rel="icon" type="x-con" href="https://www.midea.cn//favicon.ico">
</head>

<body>
    <div id="title">
        <div id="title-con">
            <img src="img/img1/logo@2x.png" alt="">
        </div>
    </div>
    <div id="center">
        <img src="img/img1/162747898112257.png" alt="">
        <div id="center-con">
            <h3><a style="width: 65px;">密码登录</a></h3>
            <form action="goodsAndShoppingCart/login.php"></form>
            <input type="text" placeholder="输入手机号"><br>
            <p></p>
            <input type="password" placeholder="输入登录密码"><br>
            <p></p>

            <input type="checkbox" name="" id="btn">
            <span>我已同意<a href="">《用户服务协议》</a>和<a href="">《隐私协议》</a></span><br>
            <input type="button" name="" value="登录" style="background-color: #0f7ece;color: white;">
            <div id="center-con-bottom">
                <img src="img/img1/wh.gif" alt="">
                <a href="zhuce.html">忘记密码  |  <span id="zhu">立即注册</span></a>
            </div>
        </div>
    </div>
    <div id="footer">

        <ul id="footer-con">
            <li><a href="">服务条款</a></li>
            <li><a href=""> 隐私政策</a></li>
            <li><a href=""> 联系我们</a></li>
            <li><a href=""> 投诉中心</a></li>
        </ul>
        <span>Copyright &copy  1968-2022 Midea Group. All Rights Reserved</span>
    </div>
</body>

</html>
<script src="js/jQuery.js"></script>
<script src="js/denglu.js"></script>
<script>
     $("input").eq(3).click(function(){
       $.post("./goodsAndShoppingCart/login.php",{
           username:$("input").eq(0).val(),
          userpass:$("input").eq(1).val()},
           function (resText) {
              if(resText.trim()=="success"){
              location.href="index.html";
              localStorage.setItem("username",$("input").eq(0).val())
              }else{
               alert ("用户名或密码错误"),
               setTimeout(()=>{
                location.href="zhuce.html"   
               },500)
              }
          
       })
    })
 
</script>